<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/part2admin/common/adminInit.jsp"%>

<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #F8F9FA;
}

h1 {
	margin-bottom: 50px;
	font-size: 40px;
	font-weight: normal;
}

p {
	margin: 0;
	padding: 0 0 30px;
	font-size: 12px;
}

pre {
	font-size: 12px;
	font-family: "Consolas", "Monaco", "Bitstream Vera Sans Mono",
		"Courier New", "Courier";
	line-height: 120%;
	background: #F4F4F4;
	padding: 10px;
}

#general {
	margin: 30px;
}

#add {
	display: none;
}

.popup {
	background: #FFF;
	border: 1px solid #333;
	padding: 1px;
}

.popup-header {
	height: 24px;
	padding: 7px;
	background: url("part2admin/common/js/box/bgr_popup_header.jpg")
		repeat-x;
}

.popup-header h2 {
	margin: 0;
	padding: 0;
	font-size: 18px;
	float: left;
}

.popup-header .close-link {
	float: right;
	font-size: 11px;
}

.popup-body {
	padding: 10px;
}

form {
	margin: 0;
	padding: 0;
}

form * {
	font-size: 12px;
}
-->
</style>

<link href="part2admin/images/skin.css" rel="stylesheet" type="text/css" />
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
	<tr>
		<td width="17" height="29" valign="top"
			background="images/mail_leftbg.gif"><img
			src="part2admin/images/left-top-right.gif" width="17" height="29" /></td>
		<td width="935" height="29" valign="top"
			background="part2admin/images/content-bg.gif">
		<table width="100%" height="29" border="0" cellpadding="0"
			cellspacing="0" class="left_topbg" id="table2">
			<tr>
				<td height="29">
				<div class="titlebt">大类列表</div>
				</td>
				<td align="right"><a href="javascript:;" onClick="add()"
					title="添加分类"><img src="part2admin/images/add.gif" border="0"
					alt="添加信息" title="添加信息" /></a></td>
			</tr>
		</table>
		</td>
		<td width="16" valign="top"
			background="part2admin/images/mail_rightbg.gif"><img
			src="part2admin/images/nav-right-bg.gif" width="16" height="29" /></td>
	</tr>
	<tr>
		<td height="71" valign="middle"
			background="part2admin/images/mail_leftbg.gif">&nbsp;</td>
		<td valign="top" bgcolor="#F7F8F9">
		<table width="100%" height="138" border="0" cellpadding="0"
			cellspacing="0">

			<tr>
				<td valign="top">
				<table width="98%" border="0" align="center" cellpadding="0"
					cellspacing="0">
					<tr>
						<td class="left_txt">当前位置：大类列表</td>
						<td class="left_txt" align="right">&nbsp;</td>
					</tr>
					<tr>
						<td height="20" colspan="2">
						<table width="100%" height="1" border="0" cellpadding="0"
							cellspacing="0" bgcolor="#CCCCCC">
							<tr>
								<td></td>
							</tr>
						</table>
						</td>
					</tr>
					<tr>
						<td colspan="2"></td>
					</tr>

					<tr>
						<td colspan="2">
						<table width="80%" height="31" border="1" align="center"
							cellpadding="0" cellspacing="0" bordercolor="#FFFFFF">
							<tr align="center" class="nowtable">
								<td class="left_bt2" width="5%">序号</td>
								<td class="left_bt2" width="25%">分类名称(中)</td>
								<td class="left_bt2" width="25%">分类名称(英)</td>
								<td class="left_bt2" width="10%">分类排序</td>
								<td class="left_bt2" width="10%">操作</td>
							</tr>

							<script language="javascript">
			 function del(id,info){
			 	if(confirm('确定删除'+info+'信息?')){
					window.location.href="bigClassAction.do?method=delete&bclassId="+id;
				}
			 }
			 </script>
							<logic:present name="page">
								<logic:iterate id="list" name="page" property="result"
									scope="request" indexId="indexid">
									<form name="bigForm" id="edi${indexid+1}t" method="post"
										action="bigClassAction.do?method=editBigClass"><input
										type="hidden" name="voa.value(edit).field(id)"
										value="${list.bclassId}" />
									<tr align="center">
										<td class="left_txt">${indexid+1}</td>

										<td class="left_txt"><input type="text"
											name="voa.value(edit).field(name)" value="${list.bclassName}"
											size="20" /></td>
										<td class="left_txt"><input type="text"
											name="voa.value(edit).field(nameEn)"
											value="${list.bclassNameEn}" size="20" /></td>
										<td class="left_txt"><input type="text"
											name="voa.value(edit).field(order)" value="${list.orderB}"
											size="3" /></td>
										<td class="left_txt"><a href="#"
											onClick="javascript: document.edi${indexid+1}t.submit()"><img
											src="part2admin/images/edit.gif" border="0" alt="编辑"
											title="编辑" /></a>&nbsp;&nbsp;&nbsp; <a href="#"
											onClick="javascript:del('${list.bclassId}','${list.bclassName}');"><img
											src="part2admin/images/delete.gif" border="0" alt="删除"
											title="删除" /></a></td>
									</tr>
									</form>
								</logic:iterate>
							</logic:present>


						</table>
						</td>
					</tr>
					<tr>

						<td colspan="2" align="center" class="left_txt"><logic:present
							name="page">
							<pager:pager action="bigClassAction.do?method=list" />
						</logic:present> <logic:notEmpty name="res">

							<bean:write name="res" />
						</logic:notEmpty></td>
					</tr>
				</table>
				</td>
			</tr>
		</table>
		</td>
		<td background="part2admin/images/mail_rightbg.gif">&nbsp;</td>
	</tr>
	<tr>
		<td valign="middle" background="part2admin/images/mail_leftbg.gif"><img
			src="part2admin/images/buttom_left2.gif" width="17" height="17" /></td>
		<td height="17" valign="top"
			background="part2admin/images/buttom_bgs.gif"><img
			src="part2admin/images/buttom_bgs.gif" width="17" height="17" /></td>
		<td background="part2admin/images/mail_rightbg.gif"><img
			src="part2admin/images/buttom_right2.gif" width="16" height="17" /></td>
	</tr>
</table>
<!--添加分类div-->
<div id="add">
<div class="popup">
<div class="popup-header">
<h2>添加产品大类</h2>
<a href="javascript:;" onClick="$.closePopupLayer('add')" title="Close"
	class="close-link"><img src="part2admin/common/js/box/close.png"
	border="0" /></a> <br clear="all" />
</div>
<div class="popup-body">
<table width="98%" border="0" align="center" cellpadding="0"
	cellspacing="1" bgcolor="#6699cc">
	<tr>
		<td height="20" bgcolor="#F7F8F9" class="left_txt" align="center">添加产品大类</td>
	</tr>
	<tr>
		<td bgcolor="#FFFFFF">
		<table width="100%" border="0" align="left" cellpadding="1"
			cellspacing="1" bgcolor="#CCCCCC">
			<tr align="center" bgcolor="#f2f2f2" class="left_txt2" height="20">
				<td width="20%">分类名称(中)</td>
				<td width="20%">分类名称(英)</td>
				<td width="13%">分类排序</td>
				<td width="13%"></td>
			</tr>
			<form name="bigForm" id="big" method="post"
				action="bigClassAction.do?method=addBigClass">
			<tr align="center" bgcolor="#FFFFFF">
				<td><input name="voa.value(big).field(name)" type="text"
					id="bName" size="12"></td>
				<td><input name="voa.value(big).field(nameEn)" type="text"
					id="bNameEn" size="12"></td>
				<td><input name="voa.value(big).field(order)" type="text"
					id="bOrder" size="4" value="1"></td>
				<td><input type="submit" name="add" value="添 加"></td>
			</tr>
			</form>
		</table>
		</td>
	</tr>
</table>


</div>
</div>
</div>
<!--添加分类div结束-->

<script type="text/javascript"> 
			//<![CDATA[
				$.setupJMPopups({
					screenLockerBackground: "#003366",
					screenLockerOpacity: "0.7"
				});
 
				function add() {
					$.openPopupLayer({
						name: "add",
						width: 550,
						target: "add"
					});
				}								
			//]]>
		</script>
</body>
